package top.continew.minithreadpool.concurrent;

import java.util.List;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.TimeUnit;

/**
 * 线程池接口
 */
public interface ThreadPoolExecutor {
    void execute(Runnable command);
    void shutdown();
    List<Runnable> shutdownNow();
    boolean isShutdown();
    boolean isTerminated();
    boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException;
    int getCorePoolSize();
    void setCorePoolSize(int corePoolSize);
    int getMaximumPoolSize();
    void setMaximumPoolSize(int maximumPoolSize);
    int getActiveCount();
    BlockingQueue<Runnable> getQueue();
    long getCompletedTaskCount();
    int getPoolSize();
}
